package center;

import java.sql.Connection;
import java.sql.DriverManager;

public class BaseDomain {
	public static Connection getConnection()
    {
        Connection conn = null;

        try
        {
        	//Ubuntu
//            String userName = "root";
//            String password = "asadmin";
        	
        	//Window
        	String userName = "root";
            String password = "sdqiproject";
            String url = "jdbc:mysql://localhost/ahp";
            Class.forName ("com.mysql.jdbc.Driver").newInstance ();
            conn = DriverManager.getConnection (url, userName, password);
        }
        catch (Exception e)
        {
            System.out.println ("Cannot connect to database server");
        }
        return conn;
    }
}
